<template>
	<view style="position: relative;">
		<view class="tab">
			<headerNav :navData="navData" @click="tab" />
		</view>
		<view class="center">
			<First v-if="tabs===0" ></First>
			<Second v-if="tabs===1"></Second>
			<Last v-if="tabs===2" ></Last>
		</view>
	</view>
</template>

<script>
	import First from '@/components/data/first.vue';
	import Second from '@/components/data/second.vue';
	import Last from '@/components/data/last.vue';
	import headerNav from "@/components/nav/nav.vue";
	export default {
		components: {
			First,
			Second,
			Last,
			headerNav
		},
		data() {
			return {
				first: '',
				second: "",
				last: '',
				tabs: 0,
				navData: [{
					title: "三重一大",
					id: '1'
				}, {
					title: "招投标",
					id: '2'
				}, {
					title: "物资采购",
					id: '3'
				}],
			};
		},
		methods: {
			tab(i, id, val) {
				this.tabs = i
				console.log(i, 'i')
			},
		},
		onLoad(){
		}
	}
</script>

<style lang="scss">
	.tab {
		width: 750rpx;
		background-color: #FFFFFF;
		padding-top: 30rpx;
		position: fixed;
		top: 0;
		z-index: 999;
	}
	.center{
		box-sizing: border-box;
		margin-top: 100rpx;
	}
</style>
